home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / hearts.swf / scripts / DefineSprite_638 / frame_1 / DoAction_12.as < prev    next >
Encoding:
Text File  |  2011-12-21  |  4.7 KB  |  219 lines

  1. this.initPUAlpha = 12;
  2. this.puHaveMax = 600;
  3. this.createPU = function(val)
  4. {
  5.    var t = this;
  6.    t.attachMovie("pu","pu" + t.pud,t.pud);
  7.    var n = t["pu" + t.pud];
  8.    if(t.gameType == "real")
  9.    {
  10.       n._x = random(t.stageW - t.startX - n._width / 2) + t.startX;
  11.    }
  12.    else
  13.    {
  14.       n._x = t.startX + random(80) + 30;
  15.    }
  16.    n._y = (- n._height) / 2;
  17.    n._xscale = n._yscale = 120;
  18.    n.my = Math.random() * 1 + 0.2;
  19.    n.typ = "pu";
  20.    if(val == 0)
  21.    {
  22.       val = random(n.graphic._totalframes) + 1;
  23.    }
  24.    n.graphic.gotoAndStop(val);
  25.    n.val = val;
  26.    t.heartA.push(n);
  27.    t.addD("pu");
  28.    t.puDel = random(300) + 250;
  29. };
  30. this.cPuText = function(x, y, typ)
  31. {
  32.    var t = this;
  33.    t.attachMovie("puText","pt" + t.td,t.td);
  34.    var n = t["pt" + t.td];
  35.    n.txtMC.gotoAndStop("pu" + typ);
  36.    n.txtMC2.gotoAndStop("pu" + typ);
  37.    n._x = x;
  38.    n._y = y;
  39.    if(n._x > t.stageW - n._width / 2)
  40.    {
  41.       n._x = t.stageW - n._width / 2;
  42.    }
  43.    if(t.soundPlay == "true")
  44.    {
  45.       t.puSound.start();
  46.    }
  47.    t.addD("t");
  48. };
  49. this.puFunc1 = function(which)
  50. {
  51.    var t = this;
  52.    if(which == true)
  53.    {
  54.       t.launcher.hSpuTim = 0;
  55.       t.hmyc = 0.6;
  56.       t.gameDisplay.p1._alpha = 100;
  57.       t.gameDisplay.p10._alpha = t.initPUAlpha;
  58.    }
  59.    else
  60.    {
  61.       t.launcher.hSpuTim = 0;
  62.       t.hmyc = t.inithmyc;
  63.       t.gameDisplay.p1._alpha = t.initPUAlpha;
  64.       t.gameDisplay.p10._alpha = t.initPUAlpha;
  65.    }
  66. };
  67. this.puFunc2 = function(which)
  68. {
  69.    var t = this;
  70.    if(which == true)
  71.    {
  72.       t.launcher.gpuTim = 0;
  73.       t.grav = 0;
  74.       t.gameDisplay.p2._alpha = 100;
  75.       t.gameDisplay.p9._alpha = t.initPUAlpha;
  76.    }
  77.    else
  78.    {
  79.       t.launcher.gpuTim = 0;
  80.       t.grav = t.initGrav;
  81.       t.gameDisplay.p2._alpha = t.initPUAlpha;
  82.       t.gameDisplay.p9._alpha = t.initPUAlpha;
  83.    }
  84. };
  85. this.puFunc3 = function(which)
  86. {
  87.    var t = this;
  88.    if(which == true)
  89.    {
  90.       t.launcher.cpuTim = 0;
  91.       t.chargeS = t.maxPower;
  92.       t.gameDisplay.p3._alpha = 100;
  93.       t.gameDisplay.p8._alpha = t.initPUAlpha;
  94.    }
  95.    else
  96.    {
  97.       t.launcher.cpuTim = 0;
  98.       t.chargeS = t.initChargeS;
  99.       t.gameDisplay.p3._alpha = t.initPUAlpha;
  100.       t.gameDisplay.p8._alpha = t.initPUAlpha;
  101.    }
  102. };
  103. this.puFunc4 = function(which)
  104. {
  105.    var t = this;
  106.    if(which == true)
  107.    {
  108.       t.launcher.mSpuTim = 0;
  109.       t.launcher.maxS = 5;
  110.       t.gameDisplay.p4._alpha = 100;
  111.       t.gameDisplay.p12._alpha = t.initPUAlpha;
  112.    }
  113.    else
  114.    {
  115.       t.launcher.mSpuTim = 0;
  116.       t.launcher.maxS = t.launcher.initMaxS;
  117.       t.gameDisplay.p4._alpha = t.initPUAlpha;
  118.       t.gameDisplay.p12._alpha = t.initPUAlpha;
  119.    }
  120. };
  121. this.puFunc5 = function(which)
  122. {
  123.    var t = this;
  124.    if(which == true)
  125.    {
  126.       t.launcher.hSIpuTim = 0;
  127.       t.heartSize = 150;
  128.       t.gameDisplay.p5._alpha = 100;
  129.       t.gameDisplay.p11._alpha = t.initPUAlpha;
  130.    }
  131.    else
  132.    {
  133.       t.launcher.hSIpuTim = 0;
  134.       t.heartSize = t.initHeartSize;
  135.       t.gameDisplay.p5._alpha = t.initPUAlpha;
  136.       t.gameDisplay.p11._alpha = t.initPUAlpha;
  137.    }
  138. };
  139. this.puFunc6 = function(which)
  140. {
  141.    var t = this;
  142.    if(which == true)
  143.    {
  144.       t.comboCount = 1;
  145.       t.gameDisplay.p6._alpha = 100;
  146.    }
  147. };
  148. this.puFunc7 = function(which)
  149. {
  150.    var t = this;
  151.    if(which == true)
  152.    {
  153.       t.launcher.tSpuTim = 0;
  154.       t.numShots = 3;
  155.       t.gameDisplay.p7._alpha = 100;
  156.    }
  157.    else
  158.    {
  159.       t.launcher.tSpuTim = 0;
  160.       t.numShots = 1;
  161.       t.gameDisplay.p7._alpha = t.initPUAlpha;
  162.    }
  163. };
  164. this.puFunc8 = function(which)
  165. {
  166.    var t = this;
  167.    if(which == true)
  168.    {
  169.       t.launcher.cpuTim = 0;
  170.       t.chargeS = t.initChargeS * 0.7;
  171.       t.gameDisplay.p8._alpha = 100;
  172.       t.gameDisplay.p3._alpha = t.initPUAlpha;
  173.    }
  174. };
  175. this.puFunc9 = function(which)
  176. {
  177.    var t = this;
  178.    if(which == true)
  179.    {
  180.       t.launcher.gpuTim = 0;
  181.       t.grav = t.initGrav * 1.5;
  182.       t.gameDisplay.p9._alpha = 100;
  183.       t.gameDisplay.p2._alpha = t.initPUAlpha;
  184.    }
  185. };
  186. this.puFunc10 = function(which)
  187. {
  188.    var t = this;
  189.    if(which == true)
  190.    {
  191.       t.launcher.hSpuTim = 0;
  192.       t.hmyc = 1.3;
  193.       t.gameDisplay.p10._alpha = 100;
  194.       t.gameDisplay.p1._alpha = t.initPUAlpha;
  195.    }
  196. };
  197. this.puFunc11 = function(which)
  198. {
  199.    var t = this;
  200.    if(which == true)
  201.    {
  202.       t.launcher.hSIpuTim = 0;
  203.       t.heartSize = 70;
  204.       t.gameDisplay.p11._alpha = 100;
  205.       t.gameDisplay.p5._alpha = t.initPUAlpha;
  206.    }
  207. };
  208. this.puFunc12 = function(which)
  209. {
  210.    var t = this;
  211.    if(which == true)
  212.    {
  213.       t.launcher.mSpuTim = 0;
  214.       t.launcher.maxS = 1;
  215.       t.gameDisplay.p12._alpha = 100;
  216.       t.gameDisplay.p4._alpha = t.initPUAlpha;
  217.    }
  218. };
  219.